package scene01_Home;

import android.graphics.Bitmap;
import android.graphics.Paint;
import baseClass.Global;
import baseClass.Sprite_Touch;
import mainSrc.MainDirector;

public class Sprite_ButtonEditor
  extends Sprite_Touch
{
  private boolean bIsActive = true;
  private int iBtnNumber = 0;
  private int iSortOfBtn = 0;
  
  public Sprite_ButtonEditor(int paramInt1, int paramInt2, int paramInt3, float paramFloat1, float paramFloat2, int paramInt4, int paramInt5)
  {
    super(paramInt1, paramInt2, paramInt3, paramFloat1, paramFloat2);
    this.iSortOfBtn = paramInt4;
    this.iBtnNumber = paramInt5;
  }
  
  public void SetButtonActive(boolean paramBoolean)
  {
    this.bIsActive = paramBoolean;
  }
  
  public boolean Touch_Check(float paramFloat1, float paramFloat2)
  {
    boolean bool = false;
    if (this.bit_img != null)
    {
      if ((paramFloat1 >= this.position_x * Global.GetInstance().dnst_w - this.bit_img.getWidth() * this.position_ax * 2.0F) && (paramFloat2 >= this.position_y * Global.GetInstance().dnst_h - this.bit_img.getHeight() * this.position_ay * 2.0F) && (paramFloat1 <= this.position_x * Global.GetInstance().dnst_w - this.bit_img.getWidth() * (this.position_ax - 1.0F) * 2.0F) && (paramFloat2 <= this.position_y * Global.GetInstance().dnst_h - this.bit_img.getHeight() * (this.position_ay - 1.0F) * 2.0F)) {
        bool = true;
      }
    }
    else {
      return bool;
    }
    this.DownAndUp = false;
    Touch_RangeOut();
    return false;
  }
  
  public void Touch_Down(float paramFloat1, float paramFloat2, MainDirector paramMainDirector)
  {
    if (this.bIsActive) {
      this.paint.setAlpha(100);
    }
  }
  
  public void Touch_DownAndUp(float paramFloat1, float paramFloat2, MainDirector paramMainDirector)
  {
    this.paint.setAlpha(255);
    if (this.bIsActive) {}
    Layer04_Editor localLayer04_Editor;
    switch (this.iSortOfBtn)
    {
    default: 
      return;
    case 0: 
      if (this.iBtnNumber == 2)
      {
        if (paramMainDirector.m_Scene01.m_Layer04.spd_Next.iCurrentLevel == 4) {
          break label207;
        }
        localLayer04_Editor = paramMainDirector.m_Scene01.m_Layer04;
      }
      for (localLayer04_Editor.iAnswer1 -= 5;; localLayer04_Editor.iAnswer1 -= 1)
      {
        if (paramMainDirector.m_Scene01.m_Layer04.iAnswer1 < paramMainDirector.m_Scene01.m_Layer04.iAnswer1_min) {
          paramMainDirector.m_Scene01.m_Layer04.iAnswer1 = paramMainDirector.m_Scene01.m_Layer04.iAnswer1_max;
        }
        if (this.iBtnNumber != 3) {
          break;
        }
        localLayer04_Editor = paramMainDirector.m_Scene01.m_Layer04;
        localLayer04_Editor.iAnswer2 -= 1;
        if (paramMainDirector.m_Scene01.m_Layer04.iAnswer2 >= paramMainDirector.m_Scene01.m_Layer04.iAnswer2_min) {
          break;
        }
        paramMainDirector.m_Scene01.m_Layer04.iAnswer2 = paramMainDirector.m_Scene01.m_Layer04.iAnswer2_max;
        return;
        label207:
        localLayer04_Editor = paramMainDirector.m_Scene01.m_Layer04;
      }
    }
    if (this.iBtnNumber == 2)
    {
      if (paramMainDirector.m_Scene01.m_Layer04.spd_Next.iCurrentLevel == 4) {
        break label393;
      }
      localLayer04_Editor = paramMainDirector.m_Scene01.m_Layer04;
    }
    for (localLayer04_Editor.iAnswer1 += 5;; localLayer04_Editor.iAnswer1 += 1)
    {
      if (paramMainDirector.m_Scene01.m_Layer04.iAnswer1 > paramMainDirector.m_Scene01.m_Layer04.iAnswer1_max) {
        paramMainDirector.m_Scene01.m_Layer04.iAnswer1 = paramMainDirector.m_Scene01.m_Layer04.iAnswer1_min;
      }
      if (this.iBtnNumber != 3) {
        break;
      }
      localLayer04_Editor = paramMainDirector.m_Scene01.m_Layer04;
      localLayer04_Editor.iAnswer2 += 1;
      if (paramMainDirector.m_Scene01.m_Layer04.iAnswer2 <= paramMainDirector.m_Scene01.m_Layer04.iAnswer2_max) {
        break;
      }
      paramMainDirector.m_Scene01.m_Layer04.iAnswer2 = paramMainDirector.m_Scene01.m_Layer04.iAnswer2_min;
      return;
      label393:
      localLayer04_Editor = paramMainDirector.m_Scene01.m_Layer04;
    }
  }
  
  public void Touch_RangeOut()
  {
    this.paint.setAlpha(255);
  }
}


/* Location:           D:\Tool\AndroidKiller_v1.3.1\projects\petdesigner\ProjectSrc\classes-dex2jar.jar
 * Qualified Name:     scene01_Home.Sprite_ButtonEditor
 * JD-Core Version:    0.7.0.1
 */